/*
 Xern Entity Relocation Network
 Copyright (C) 2011 Ronie Salgado <roniesalg@gmail.com>

 This library is free software; you can redistribute it and/or
 modify it under the terms of the GNU Lesser General Public
 License as published by the Free Software Foundation; either
 version 2.1 of the License, or (at your option) any later version.

 This library is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 Lesser General Public License for more details.

 You should have received a copy of the GNU Lesser General Public
 License along with this library; if not, write to the Free Software
 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301
*/

#include <OgreParticleSystem.h>
#include "ParticleSystem.hpp"

namespace XernOgre
{
	ParticleSystem::ParticleSystem(Ogre::ParticleSystem *system)
		: system(system)
	{
		id = nil_uuid();
	}

	ParticleSystem::~ParticleSystem()
	{
	}

	IResource::ResourceFlags ParticleSystem::GetFlags() const
	{
		return RFL_MOVABLE_OBJECT;
	}

	void ParticleSystem::UpdateState(boost::shared_ptr<IDataFilter> stateData)
	{
	}

	const uuid &ParticleSystem::GetId() const
	{
		return this->id;
	}

	void ParticleSystem::SetId(const uuid &id)
	{
		this->id = id;
	}

	void ParticleSystem::SetTransform(const ReversibleTransform &trans)
	{
		transform = trans;
	}

	const ReversibleTransform &ParticleSystem::GetTransform() const
	{
		return transform;
	}

	bool ParticleSystem::IsEmitting() const
	{
		return system->getEmitting();
	}

	void ParticleSystem::SetEmitting(bool value)
	{
		system->setEmitting(value);
	}

	Ogre::MovableObject *ParticleSystem::GetMovable()
	{
		return system;
	}

	void ParticleSystem::DelayAttach(boost::shared_ptr<SceneNode> node)
	{
	}

}; // namespace XernOgre
